from pymysql import *


def main():
    conn = connect(host='127.0.0.1', port=3306, user='root', password='Sun830615', database='py_study')
    cursor = conn.cursor()
    for i in range(100000):
        cursor.execute("insert into idx_test values ('txt_%d')" % i)
    conn.commit()
    cursor.close()
    conn.close()


if __name__ == '__main__':
    main()
